home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / InspectorMain.68k.r < prev    next >
Encoding:
Text File  |  1996-11-19  |  4.8 KB  |  248 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        InspectorMain.r
  3.  
  4.     Contains:    Resources for Inspector
  5.  
  6.     Copyright:    © 1991-1995 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10.  
  11. #include "SysTypes.r"
  12. #include "Types.r"
  13.  
  14. INCLUDE "Inspector.obj";
  15.  
  16. #include "VersionResource.r"
  17.  
  18. #include "SimpleCommon.h"
  19.  
  20.  
  21. #define kPrefSize                200
  22. #define kMinSize                100
  23.  
  24. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  25.  
  26. resource 'SIZE' (-1) {
  27.     dontSaveScreen,
  28.     acceptSuspendResumeEvents,
  29.     enableOptionSwitch,
  30.     canBackground,
  31.     multiFinderAware,    /* this says we do our own activate/deactivate; don't fake us out */
  32.     backgroundAndForeground, /* this is definitely note a background-only application! */
  33.     dontGetFrontClicks,    /* change this is if you want "do first click" behavior like the Finder */
  34.     ignoreChildDiedEvents,
  35.     is32BitCompatible,
  36.     reserved, reserved, reserved, reserved,
  37.     reserved, reserved, reserved,
  38.     kPrefSize * 1024,
  39.     kMinSize * 1024
  40. };
  41.  
  42.  
  43. type 'MOOT' as 'STR ';
  44.  
  45.  
  46. resource 'MOOT' (0) {
  47.     "ASLM Test Application"
  48. };
  49.  
  50.  
  51. resource 'BNDL' (128) {
  52.     'MOOT',
  53.     0,
  54.     {
  55.         'ICN#',
  56.         {
  57.             0, 128
  58.         },
  59.         'FREF',
  60.         {
  61.             0, 128
  62.         }
  63.     }
  64. };
  65.  
  66.  
  67. resource 'FREF' (128) {
  68.     'APPL',
  69.     0,
  70.     ""
  71. };
  72.  
  73.  
  74. resource 'ICN#' (128) {
  75.     { /* array: 2 elements */
  76.         /* [1] */
  77.         $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
  78.         $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
  79.         $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
  80.         $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
  81.         $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
  82.         $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
  83.         $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
  84.         $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
  85.         /* [2] */
  86.         $"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03"
  87.         $"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF"
  88.         $"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8"
  89.         $"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE"
  90.         $"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC"
  91.         $"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0"
  92.         $"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE"
  93.         $"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E"
  94.     }
  95. };
  96.  
  97.  
  98. resource 'STR#' (kInspectorMainErrStrings, purgeable) {
  99.     {
  100.     "Could not load the InspectorLibrary. Inspector functionality will be minimal";
  101.     "InitLibraryManager failed. Inspector functionality will be minimal"
  102.     }
  103. };
  104.  
  105. /* Resources for the SimpleProgram NV routine */
  106.  
  107. /* we use an MBAR resource to conveniently load all the menus */
  108.  
  109. resource 'MBAR' (rMenuBar) {
  110.     { mApple, mFile, mEdit};
  111. };
  112.  
  113. resource 'MENU' (mApple) {
  114.     mApple, textMenuProc,
  115.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  116.     enabled, apple,
  117.     {
  118.         "About Inspector…",
  119.             noicon, nokey, nomark, plain;
  120.         "-",
  121.             noicon, nokey, nomark, plain
  122.     }
  123. };
  124.  
  125. resource 'MENU' (mFile) {
  126.     mFile, textMenuProc,
  127.     0b0000000000000000000000000001000,    /* enable Quit only, program enables others */
  128.     enabled, "File",
  129.     {
  130.         "Load ASLM",
  131.             noicon, "L", nomark, plain;
  132.         "Unload ASLM",
  133.             noicon, "U", nomark, plain;
  134.         "Goto Real Program",
  135.             noicon, "G", nomark, plain;
  136.         "Quit",
  137.             noicon, "Q", nomark, plain
  138.     }
  139. };
  140.  
  141.  
  142. resource 'MENU' (mEdit) {
  143.     mEdit, textMenuProc,
  144.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  145.     enabled, "Edit",
  146.      {
  147.         "Undo",
  148.             noicon, "Z", nomark, plain;
  149.         "-",
  150.             noicon, nokey, nomark, plain;
  151.         "Cut",
  152.             noicon, "X", nomark, plain;
  153.         "Copy",
  154.             noicon, "C", nomark, plain;
  155.         "Paste",
  156.             noicon, "V", nomark, plain;
  157.         "Clear",
  158.             noicon, nokey, nomark, plain
  159.     }
  160. };
  161.  
  162.  
  163. /* this ALRT and DITL are used as an error screen */
  164. resource 'ALRT' (rUserAlert, purgeable) {
  165.     {40, 20, 180, 330},
  166.     rUserAlert,
  167.     { /* array: 4 elements */
  168.         /* [1] */
  169.         OK, visible, silent,
  170.         /* [2] */
  171.         OK, visible, silent,
  172.         /* [3] */
  173.         OK, visible, silent,
  174.         /* [4] */
  175.         OK, visible, silent
  176.     }
  177. };
  178.  
  179. resource 'DITL' (rUserAlert, purgeable) {
  180.     { /* array DITLarray: 3 elements */
  181.         /* [1] */
  182.         {110, 220, 130, 300},
  183.         Button {
  184.             enabled,
  185.             "OK"
  186.         },
  187.         /* [2] */
  188.         {10, 60, 90, 300},
  189.         StaticText {
  190.             disabled,
  191.             "Error. ^0."
  192.         },
  193.         /* [3] */
  194.         {8, 8, 40, 40},
  195.         Icon {
  196.             disabled,
  197.             2
  198.         }
  199.     }
  200. };
  201.  
  202.  
  203. /* this ALRT and DITL are used as an About screen */
  204.  
  205. resource 'ALRT' (rAboutAlert, purgeable) {
  206.     {40, 20, 160, 330 }, rAboutAlert, {
  207.         OK, visible, silent;
  208.         OK, visible, silent;
  209.         OK, visible, silent;
  210.         OK, visible, silent
  211.     };
  212. };
  213.  
  214. resource 'DITL' (rAboutAlert, purgeable) {
  215.     { /* array DITLarray: 5 elements */
  216.         /* [1] */
  217.         {88, 224, 108, 304},
  218.         Button {
  219.             enabled,
  220.             "OK"
  221.         },
  222.         /* [2] */
  223.         {8, 8, 24, 304 },
  224.         StaticText {
  225.             disabled,
  226.             "ASLM Inspector Application"
  227.         },
  228.         /* [3] */
  229.         {32, 8, 48, 237},
  230.         StaticText {
  231.             disabled,
  232.             "Copyright © 1991-1993 Apple Computer"
  233.         },
  234.         /* [4] */
  235.         {56, 8, 72, 136},
  236.         StaticText {
  237.             disabled,
  238.             "Brought to you by:"
  239.         },
  240.         /* [5] */
  241.         {80, 24, 112, 220},
  242.         StaticText {
  243.             disabled,
  244.             "The ASLM Team"
  245.         }
  246.     }
  247. };
  248.